< previous page page_323 next page >

Page 323
12181-0323a.gif
Figure 12.8.
The completed SQL statement is now displayed in the Commands
folder of the Data Environment.
Child Commands
A Child command is nothing more than a SQL query that is dependent on a previous or Parent command to create a hierarchical query that can be used to display data in a Data Report or a Hierarchical FlexGrid control. Adding the command itself is the same as building the first query, which is as simple as right-clicking the first command and then selecting ADO Child Command from the pop-up menu. However, after the command is defined, you need to define the relationship it has with its Parent command. In the Child Command Properties dialog, go to the Relation tab. This is where you would specify the fields that relate the two commands together, creating a master/detail type relationship. Using the information in Table 12.1, define a Child command that contains the order detail for a customers order. Once you have done this, the Data Environment will show the Child command included within the Parent command as shown in Figure 12.9.

 
< previous page page_323 next page >

If you like this book, buy it!